#include "main.hh"
#include "Game.hh"
 
int main() 
{
    // Set random number seed for random item drops
    srand(static_cast<unsigned int>(time(nullptr)));

    // set up the game configuration
    //1. Create Rooms
    Room* Hell_Gate = new Room("Hell's Gate", "Dear warrior, you are at the entrance to Hell. Are you ready?");
    Room* Lava_Crevice = new Room("Lava Crevice", "In a crevice filled with lava, there is a pair of vicious eyes staring at you");
    Room* Netherbone_Bridge = new Room("Netherbone Bridge", "A massive bridge made of millions of skeletons, guarded by the last Bone King of the Skeleton Empire");
    Room* Infernal_Forbidden_Ground = new Room("Infernal Forbidden Ground", "The true secret of Hell lies here, guarded by the Troll ruling the darkness");
    Game::setup_rooms(Hell_Gate, Lava_Crevice, Netherbone_Bridge, Infernal_Forbidden_Ground);
    
    //2. Create player character
    Character* player = new Character("Warrior", "Sent to face danger, seeking the secrets of Hell", 20, 10, 2);

    Room* currentRoom = Hell_Gate;
    // Game main loop, continues until player wins(kill boss) or dies
    Game::run(currentRoom, player);
    
    // Release memory for all allocated objects
    Game::DeleteAllObjects(Hell_Gate, Lava_Crevice, Netherbone_Bridge, Infernal_Forbidden_Ground, player);

    return 0;
}


